<%@page import="java.util.List,java.util.Iterator,com.crm.entity.Supplier" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/temp.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->

<!-- InstanceEndEditable -->
<link href="<%=application.getContextPath()%>/css/css-crm.css" rel="stylesheet" type="text/css" />

<script  type="text/javascript" src="<%=application.getContextPath()%>/js/jquery-1.6.min.js"></script> 


<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<script language="javascript">

        function addRow(userTable) {
 
            var table = document.getElementById(userTable);
 			var rowCount = table.rows.length;
			var row = table.insertRow(rowCount);
			
			table.setAttribute("bgColor", "#C5E4EB");
		    var cell1 = row.insertCell(0);
		    cell1.innerHTML = rowCount ;
           	cell1.setAttribute("bgColor","#FFFFFF");
           	cell1.setAttribute("align","center");
            
           	
            var cell2 = row.insertCell(1);
            cell2.setAttribute("bgColor","#FFFFFF");
            var element2 = document.createElement("input");
			element2.type = "text";
			element2.name=""+rowCount;
			element2.id="cperson"+rowCount;
			element2.className="user";
			element2.size="15";
            cell2.appendChild(element2);
            
            
            var cell3 = row.insertCell(2);
            cell3.setAttribute("bgColor","#FFFFFF");
            var element3 = document.createElement("input");
			element3.type = "text";
			element3.name="division"+rowCount;
			element3.id="division"+rowCount;
			element3.className="user";
			element3.size="15";
            cell3.appendChild(element3);
			
			var cell4 = row.insertCell(3);
			cell4.setAttribute("bgColor","#FFFFFF");
			 var element4 = document.createElement("input");
				element4.type = "text";
				element4.name="phone"+rowCount;
				element4.id="phone"+rowCount;
				element4.className="user";
				element4.size="15";
	            cell4.appendChild(element4);
			
			
			 var cell5 = row.insertCell(4);
			//cell5.innerHTML='<input name="org[]"  id="org"'+rowcount+' type="text" class="tablebox-form" size="8"  />';
			 cell5.setAttribute("bgColor","#FFFFFF");
			 var element5 = document.createElement("input");
				element5.type = "text";
				element5.name="email"+rowCount;
				element5.id="email"+rowCount;
				element5.className="user";
				element5.size="15";
	            cell5.appendChild(element5);
				
	            document.getElementById('rowcountid').value=rowCount;

            

        
        }
 
        function deleteRow(userTable) {
        	var tbl = document.getElementById(userTable);
        	var lastRow = tbl.rows.length;
        	if (lastRow > 2) tbl.deleteRow(lastRow - 1);
        
        }
 
       

    </script>
</head>

<body>
<div id="main">
<%@ include file="common/header.jsp" %>
  <%@ include file="common/submenu.jsp" %>

  
  <div id="content"><!-- InstanceBeginEditable name="EditRegion3" -->
  <div id="saveSupDiv">
  <form name="supplierfrm" action="<%=application.getContextPath()%>/supplier/deleteSupplier.do" method="post">
    <div id="work-area">
      <div class="heading">Supplier</div>
	  
      <div class="box">
      
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left">&nbsp;</td>
              <td align="left">&nbsp;</td>
              <td align="left" valign="middle">&nbsp;</td>
              <td align="left" valign="middle">&nbsp;</td>
              <td align="left" valign="middle">&nbsp;</td>
              <td align="left" valign="middle">&nbsp;</td>
            </tr>
            <tr>
              <td width="9%" align="left">&nbsp;</td>
              <td width="17%" align="left">Supplier Name</td>
              <td width="29%" align="left" valign="middle"><label></label> 
             <%if(request.getAttribute("supplier-List")==null){
            	 out.println("Source List Is Null");
                %>        
                  
                  <% }else if(request.getAttribute("supplier-List")!=null){%>
                 <select name="supname" class="form" id="supnameid">
                 <option value="">Please Select</option>
                 <%
                 List<Supplier> suplist=(List<Supplier>)request.getAttribute("supplier-List");
                 for(int i=0;i<suplist.size();i++){
                 %>
                 <option  value="<%=suplist.get(i).getName()%>"><%=suplist.get(i).getName()%></option>
                 <%}
                 }  
                 %>
                 </select>
                 </td>
              
            </tr>
            
          </table>
       
      </div>
	  
	  <div class="box2">
	  <table>
	   <tr>
	  <td>
        
                </td>
        </tr>
        
              <tr>
                <td> 
                 <div class="box2">
	    			<div class="buttton-main">
	    			<input type="image" value="Delete" class="button"/>
	    				
	    				
	    				
	    			</div>
	  			</div>
	  </td>
              </tr>
              </table>
      </div>
	  
	  
    </div>
    </form>
    </div>
    <div id="editSupDiv"></div>
    <!-- InstanceEndEditable -->
    </div><div id="footer"></div>  
</div>
</body>
<!-- InstanceEnd --></html>

